package com.lsf.studentmanagerup.dao;

import com.lsf.studentmanagerup.bean.Student;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * @author 李树飞
 */
public interface StudentDao {

    //增加学生
    int addStudent(Student student) throws SQLException;

    //根据学号删除学生
    int removeStudentById(int id) throws SQLException;

    //根据id修改学生
    int updateStudentById(Student student) throws SQLException;

    //根据学号查找学生
    Student getStudentById(String id) throws SQLException;

    //获取所有学员信息，（属性：查询条件）
    List<Student> getAllStudents() throws SQLException;

    //根据查询条件，查找总记录数
    long getTotalCount(Map<String, String> condition) throws SQLException;

    //分页获取学生信息，从0开始
    List<Student> getStudentsByPage(int start, int rows, Map<String, String> condition) throws SQLException;

}
